<?php /*a:1:{s:56:"/www/wwwroot/cmf_job/68/app/admin/view/main/version.html";i:1692601674;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>工作台</title>
    <link rel="stylesheet" href="/static/assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/assets/module/admin.css?v=318"/>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-form-label{
            width: 120px;
        }
    </style>
</head>
<body>
<!-- 正文开始 -->
<div class="layui-fluid ew-console-wrapper">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-xs12">
            <div class="layui-card">
                <div class="layui-card-header">
                    版本设置
                </div>
                <div class="layui-card-body">
                    <form class="layui-form" action="">

                        <div class="layui-form-item">
                            <label class="layui-form-label">版本号</label>
                            <div class="layui-input-inline">
                                <input type="text" name="version" required lay-verify="required" placeholder="版本号"class="layui-input" value="<?php echo htmlentities($info['version']); ?>">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">下载链接</label>
                            <div class="layui-input-inline">
                                <input type="text" name="url" required lay-verify="required" placeholder="下载链接"class="layui-input" value="<?php echo htmlentities($info['url']); ?>">
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">立即保存</button>
<!--                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- js部分 -->
<script type="text/javascript" src="/static/assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="/static/assets/js/common.js?v=318"></script>
<script>
    layui.use(['layer','element','form'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;

        form.on('submit(formDemo)', function(data){
            $.post("<?php echo url('admin/main/version'); ?>", data.field, function (res) {
                if (res.code === 200) {
                    layer.msg('保存成功', {icon: 1, time: 1500}, function () {
                        location.reload()
                    });
                } else {
                    layer.msg(res.msg, {icon: 2, anim: 6});
                }
            }, 'json');
            return false;
        });
    });
</script>
</body>
</html>
